package com.cms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.dao.mapper.BankInfoMapper;
import com.cms.exception.SystemDBException;
import com.cms.model.TrBankAccount;
import com.cms.model.TrBankInfo;
import com.cms.service.BankInfoService;

@Service
public class BankInfoServiceImpl implements BankInfoService {

	@Autowired
	private BankInfoMapper bankInfoMapper;
	
	
	@Override
	public void saveBankInfo(TrBankInfo info) throws SystemDBException {
		bankInfoMapper.saveBankInfo(info);
	}

	@Override
	public void updateBankInfo(TrBankInfo info) throws SystemDBException {
		bankInfoMapper.updateBankInfo(info);
	}


	@Override
	public TrBankInfo getBankInfo(TrBankInfo info) {
		return bankInfoMapper.getBankInfo(info);
	}

	@Override
	public void changeBankAccountStatus(TrBankAccount account)
			throws SystemDBException {
          bankInfoMapper.changeBankAccountStatus(account);		
	}

	@Override
	public void saveBankAccount(TrBankAccount account) throws SystemDBException {
          bankInfoMapper.saveBankAccount(account);		
	}

	@Override
	public void updateBankAccount(TrBankAccount account)
			throws SystemDBException {
		  bankInfoMapper.updateBankAccount(account);
	}

	@Override
	public TrBankAccount getBankAccountInfo(TrBankAccount info) {
		return bankInfoMapper.getBankAccountInfo(info);
	}

	@Override
	public List<TrBankInfo> getBankInfoList() {
		return bankInfoMapper.getBankInfoList();
	}

	
}
